package za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Strategy.Factory;


import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Strategy.Model.SkiStrategy;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Strategy.Model.HikeStrategy;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Strategy.Model.Context;
import za.ac.cput.peterjohn.DesignPatternPrincipals.Behavioral.Strategy.Model.Strategy;

public class StrategyFactory 
{
    private static SkiStrategy skiStratergy = null;
    private static HikeStrategy hikeStratergy = null;
    private static Context context = null;

    public static Strategy createSkiStrategy()
    {
        if( skiStratergy == null)
            skiStratergy = new SkiStrategy();
        return skiStratergy;
    }

    public static Context createContext(int tempretureInF, Strategy skiStrategy) 
    {
        if ( context == null )
            context = new Context(tempretureInF, skiStrategy);
        return context;
    }

    public static Strategy createHikeStrategy()
    {
        if( hikeStratergy == null)
            hikeStratergy = new HikeStrategy();
        return hikeStratergy;
    }
}